import {Base} from "@/js/api/base";
import axios from "axios";

export class Merchant extends Base {
    // constructor(port) {
    //     super(port);
    //     this.$axios = axios.create({
    //         baseURL: 'http://127.0.0.1:30002' + this.port,
    //         timeout: 30000,// 超时 毫秒
    //     })
    // }
    /**
     * 枚举列表
     * @param params
     * @param callBack
     */

    merchantLogin(params, callBack) {
        return this.post('/merchant/auth/merchant_login', params, callBack)
    }
    systemCreate(params, callBack) {
        return this.post('/merchant/system/create', params, callBack)
    }
    merchantCreate(params, callBack) {
        return this.post('/merchant/merchant/create', params, callBack)
    }
    changePassword(params, callBack) {
        return this.post('/merchant/merchant/change_password', params, callBack)
    }
    changeStatus(params, callBack) {
        return this.post('/merchant/merchant/change_status', params, callBack)
    }
    merchantList(params, callBack) {
        return this.get('/merchant/merchant/list', params, callBack)
    }
    merchantDetail(params, callBack) {
        return this.get('/merchant/merchant/detail', params, callBack)
    }
    appDetailPublic(params, callBack, setting) {
        return this.get('/merchant/app/detail_public', params, callBack, setting)
    }
    appdetail(params, callBack) {
        return this.get('/merchant/app/detail', params, callBack)
    }
    applist(params, callBack) {
        return this.get('/merchant/app/list', params, callBack)
    }
    appset(params, callBack) {
        return this.post('/merchant/app/set', params, callBack)
    }
    atmSet(params, callBack){
        return this.post('/merchant/atm/set', params, callBack)
    }
    atmDetail(params, callBack){
        return this.get('/merchant/atm/detail', params, callBack)
    }
    atmWithdraw(params, callBack){
        return this.post('/merchant/atm/withdraw', params, callBack)
    }
    withdrawList(params, callBack){
        return this.get('/merchant/withdraw/list', params, callBack)
    }
    atmAccountSet(params, callBack){
        return this.post('/merchant/atm/account_set', params, callBack)
    }
    atmAccountList(params, callBack, set){
        return this.get('/merchant/atm/account_list', params, callBack, set)
    }
    balanceLogs(params, callBack){
        return this.get('/merchant/balance/logs', params, callBack)
    }
    wxUserList(params, callBack){
        return this.get('/merchant/wx_user/list', params, callBack)
    }
}